import { Component, OnInit , ChangeDetectionStrategy} from '@angular/core';
import { ActionCode } from '@config/actionCode';
import { LoginInOutService } from '@core/services/common/login-in-out.service';
import { Router } from '@angular/router';

@Component({
  selector: 'app-dashboard',
  templateUrl: './dashboard.component.html',
  styleUrls: ['./dashboard.component.less'],
  //changeDetection: ChangeDetectionStrategy.OnPush
})
export class DashboardComponent implements OnInit {
  actionCode = ActionCode;
  testInput = '';

  constructor(
    private loginInOut: LoginInOutService,
    private router: Router,
  ) {

  }

  ngActivated(): void {
    console.log('ngActivated');
  }

  ngOnInit(): void {
    console.log('ngOnInit');
  }

  gotoEmpty() {
    this.router.navigateByUrl('/main/empty');
  }

  gotoChart() {
    this.router.navigateByUrl('/main/chart');
  }

  gotoHome() {
    this.router.navigateByUrl('/home');
  }

  mockLogOut() {
    this.loginInOut.logout();
  }

}
